<fieldset>

    <legend>条件搜索</legend>

    <form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">捐款人姓名</label>
            <div class="layui-input-inline">
                <input name="realname" value="{:input('get.realname')}" placeholder="请输入捐款人姓名" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">联系手机</label>
            <div class="layui-input-inline">
                <input name="phone" value="{:input('get.phone')}" placeholder="请输入联系手机" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">显示状态</label>
            <div class="layui-input-inline">
                <select class="layui-select" name="status">
                    {foreach [''=>'-- 全部状态 --','0'=>'隐藏','1'=>'显示'] as $k=>$v}
                    {if input('get.status') eq $k.""}
                    <option selected value="{$k}">{$v}</option>
                    {else}
                    <option value="{$k}">{$v}</option>
                    {/if}
                    {/foreach}
                </select>
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">筛选异常数据</label>
            <div class="layui-input-inline">
                <select class="layui-select" name="condition">
                    {foreach [''=>'-- 全部类型 --','0'=>'小于1元','1'=>'小于10元','2'=>'大于10000元'] as $k=>$v}
                    {if input('get.condition') eq $k.""}
                    <option selected value="{$k}">{$v}</option>
                    {else}
                    <option value="{$k}">{$v}</option>
                    {/if}
                    {/foreach}
                </select>
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">创建时间</label>
            <div class="layui-input-inline">
                <input data-date-range name="create_at" value="{:input('get.create_at')}" placeholder="请选择创建时间" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
            <button class="layui-btn layui-btn-primary" data-export-list><i class="layui-icon">&#xe67d;</i> 导 出</button>
        </div>
    </form>

</fieldset>

<script>
    form.render();
    $('[data-export-list]').on('click', function () {
        window.open("{:url('export')}?" + $(this).parents('form').serialize());
    });
</script>
